<?php
require_once(APP.'libs'.DS.'system_properties.php');
require_once(APP.'libs'.DS.'my_app_model.php');

class Clicklogs extends MyAppModel
{
	var $name='Clicklogs';
	var $validate = array();

	public function save($user_id,$product_id,$extra = ''){
		$user_id = intval($user_id);
		$product_id = intval($product_id);
		$extra = mysql_escape_string($extra);
		$sql = "INSERT INTO `g_clicklogs` (`user_id` ,`product_id`,`extra`)VALUES ( '{$user_id}', '{$product_id}',".(empty($extra)?'NULL':"'$extra'").");";
		$this->query($sql);
	}
}
